<template>

	<view class="wrap">
		<myScan ref="myScan" v-if="scanCodeIsShow" @scanCode="scanCode"></myScan>
		<ErrDialog v-if="errDialogOpen" ref="errDialog" :dialogData="dialogData" @retryFunciton="retryFunciton">
		</ErrDialog>
		<u-tabs :list="list" :current="current" @change="change"></u-tabs>
		<!-- 调取货架 -->
		<view v-if="current === 0" style="padding-bottom: 120rpx;">
			<view class="example-body">
				<!-- <u-form-item label="区域" label-width="170">
					<uni-data-select placeholder="请选择区域" v-model="form.quy_no" @showSelector="showSelector($event)"
						:localdata="quNoList" @change="changeQuyNo"></uni-data-select>
				</u-form-item> -->
				<u-form-item label="工作站" label-width="170">
					<!-- @showSelector="showSelector($event)" -->
					<uni-data-select placeholder="请选择工作站" v-model="GZTID" :localdata="gztList"
						@change="changeGzt"></uni-data-select>
				</u-form-item>
				<u-form-item label="指定货架" label-width="170">
					<u-input placeholder="请输入货架编号" @click="changeScanInput('form.huoj')" v-model='form.huoj'></u-input>
				</u-form-item>
				<u-form-item label="货架类型" label-width="170">
					<!-- @showSelector="showSelector($event)" -->
					<uni-data-select placeholder="请选择货架类型" v-model="form.huojType" :localdata="huojTypeList"
						@change="changeHuojType"></uni-data-select>
				</u-form-item>

				<!-- <u-form-item label="货位类型" label-width="170">
					<uni-data-select placeholder="请选择货位类型" v-model="form.locationType" 
						:localdata="locationTypeList" @change="changeLocationType"></uni-data-select>
				</u-form-item> -->


				<!-- <u-form-item label="商品信息" label-width="170" right-icon="">
					<uni-easyinput v-model="goods" placeholder="请输入商品信息" style="margin-right: 10rpx;"></uni-easyinput>
					<u-button type="primary" @click="searchMx">搜索</u-button>
				</u-form-item> -->
				<!-- <u-form-item label="整散类型" label-width="170">
					<uni-data-select placeholder="请选择整散类型" v-model="form.zhengsSign"
						@showSelector="showSelector($event)" :localdata="zhengsSignList"
						@change="changeZhengsSign"></uni-data-select>
				</u-form-item> -->
				<u-form-item label="空满标识" label-width="170">
					<uni-data-select placeholder="请选择空满标识" v-model="form.efType" :localdata="efTypeList"
						@change="changeEfType"></uni-data-select>
				</u-form-item>
				<u-form-item label="空置率" label-width="170">
					<uni-easyinput v-model='form.kzlLower' type='number' min='0' max='99'></uni-easyinput>~
					<uni-easyinput v-model='form.kzlUpper' type='number' min='0' max='100'></uni-easyinput>
				</u-form-item>
				<view v-show="showHeight" style="margin: 460rpx;"></view>
				<view v-show="dev">
					货架:{{selectedHuoj}}


				</view>
				<!-- <u-checkbox-group @change="checkboxGroupChange">
							<u-checkbox 
								@change="checkboxChange" 
								v-model="item.checked" 
								v-for="(item, index) in testList" :key="index" 
								:name="item.name"
							>{{item.name}}</u-checkbox>
						</u-checkbox-group>
						<u-button @click="checkedAll">全选</u-button> -->
				<u-gap height="10" bg-color="#f5f5f5"></u-gap>
				<u-empty v-if="!huojList.length" text="暂无货架,请更改选项查询" mode="page"></u-empty>
				<u-checkbox-group @change="radioGroupChange" v-if="current === 0">
					<u-card v-for="(item, index) in huojList" :key="index" class="task-list-item" :border="false"
						padding="20" margin="20rpx">
						<view slot="head" style="display: flex;align-items: center;justify-content: space-between;"
							@change="radioChange">
							<view style="display: flex;align-items: center;font-size: 30rpx;">
								{{index+1}}. 货架号:{{item.HUOJNO}}
								
								<view style="color: #999999;font-size: 22rpx;margin-left: 200rpx;">
									货架面:{{item.ORIENTATIONS}}
									</view>
							</view>
							<!-- <view style="color: #999999;font-size: 22rpx;">货架面:{{item.ORIENTATIONS}}</view>
							<uni-icons style="float: right;" type="forward" size="13"></uni-icons> -->
						</view>
						<view class="" slot="body">
							<u-row gutter="16">
								<u-col span="12">
									<view class="apply-text"><span>货位类型：</span>
										{{getItmHuowType(item.HUOW_TYPE)}}
									</view>
									<!-- 根据货架号 500以后是多层货架 -->
									<view class="apply-text"><span>货架类型：</span>
										{{getItmHuojType(item.HUOJNO)}}
									</view>
								</u-col>
								<u-divider color="#fa3534" half-width="400"></u-divider>


							</u-row>
							<view>
								<u-checkbox active-color="#19be6b" @change="radioChange" v-model="item.checked"
									:key="index" :name="item.HUOJNO+'@'+item.ORIENTATIONS">
									<view style="width: 100vh;">
										选择此面货架
									</view>
								</u-checkbox>
							</view>
						</view>

					</u-card>
				</u-checkbox-group>
				<!-- <u-button @click="checkedAll">全选</u-button> -->
				<u-loadmore :status="status" />

			</view>
			<view style="height: 400prx;">-</view>
		</view>
		<u-row v-if="current === 0 " gutter="32" class="more-bottom-box" justify="center">
			<u-col span="10" @click="changeScanInput('form.boxNumber')">
				<view>
					<u-form-item label="箱号:" label-width="120">
						<u-input style="margin-bottom: 24rpx;margin-top:12rpx;" border ref="form-boxNumber"
							v-model="form.boxNumber" @click="changeScanInput('form.boxNumber')" placeholder="请输入箱号或扫码">
						</u-input>
					</u-form-item>
				</view>
			</u-col>
			<u-col span="10">
				<view class="my-button-group">
					<u-button class="tow-button" type="success" shape="circle" :disabled="!selectedHuoj.length > 0"
						@click="submitSelectedHuojs()">调取</u-button>
					<u-button class="tow-button" type="primary" shape="circle" @click="getdata()">查询</u-button>
				</view>
			</u-col>
		</u-row>


		<view v-if="current === 1" class="example-body" style="padding-bottom: 140rpx;">
			<!-- <view > -->
			<!-- <u-form-item label="商品信息" label-width="170" right-icon="">
					<uni-easyinput v-model="goods" placeholder="请输入商品信息" style="margin-right: 10rpx;"></uni-easyinput>
					<u-button type="primary" @click="searchMx">搜索</u-button>
				</u-form-item> -->
			<u-form-item label="货位号" label-width="190" right-icon="">
				<u-input v-model="inbillForm.location" border @click="changeScanInput('inbillForm.location')"
					placeholder="请输入货位号" style="margin-right: 10rpx;" @confirm="changeFocusToBoxNumber"></u-input>
				<!-- <u-button type="primary" @click="searchMx">搜索</u-button> -->
			</u-form-item>
			<u-form-item label="箱号" label-width="190" right-icon="">
				<u-input v-model="inbillForm.boxNumber" placeholder="请输入箱号" style="margin-right: 10rpx;" border
					:focus="boxNumberFocus" @click="changeScanInput('inbillForm.boxNumber')"
					@confirm="searchMx"></u-input>
<<<<<<< HEAD
				<u-button class="tow-button" @click="getMessage()">获取信息</u-button>

=======
					<u-button class="tow-button"   @click="getMessage()">获取信息</u-button>
					
>>>>>>> 67c8ac6b418dd6104f97728e3349749fa20a30bf
				<!-- <u-button @click="navTo('/pages/sys/storage/list')">选择</u-button> -->
			</u-form-item>
			<u-form-item v-if="oneMx" label="实际上架件数" label-width="190" right-icon="">
				<u-input v-model="oneMx.vue_number" placeholder="请输入箱号" style="margin-right: 10rpx;" border
					:focus="boxNumberFocus" type='number' min='1' @click="changeScanInput('inbillForm.boxNumber')"
					@confirm="searchMx"></u-input>
<<<<<<< HEAD

=======
					
>>>>>>> 67c8ac6b418dd6104f97728e3349749fa20a30bf
			</u-form-item>
			<!-- <u-form-item label="实际上架数量" label-width="170" right-icon="">
				<u-input v-model="inbillForm.boxNumber" placeholder="请输入箱号" style="margin-right: 10rpx;" border
					:focus="boxNumberFocus" 
					@click="changeScanInput('inbillForm.boxNumber')"
					@confirm="searchMx"></u-input>
			</u-form-item> -->
			<!-- </view> -->

			<uni-card>
				<u-row gutter="16">
					<u-col span="12">
						<view class="apply-text"><span>箱号：</span>{{inbillForm.boxNumber}}</view>
					</u-col>
					<u-col span="12">
						<view class="apply-text"><span>商品名称：</span>{{oneMx.GDNAME}}</view>
					</u-col>
					<u-col span="12">
						<view class="apply-text"><span>商品编码：</span>{{oneMx.GDSEQ}}</view>
					</u-col>
					<u-col span="12">
						<view class="apply-text"><span>生产厂家：</span>{{oneMx.PRODUCERNAME}}</view>
					</u-col>
					<u-col span="12">
						<view class="apply-text"><span>批号：</span>{{oneMx.BATCHNO}}</view>
					</u-col>
					<!-- <u-col span="12">
						<view class="apply-text"><span>批号：</span>{{oneMx.BATCHNO}}</view>
					</u-col> -->
					<u-col span="12">
						<view class="apply-text"><span>总数量：</span>{{oneMx.AMOUNT}}</view>
					</u-col>
					<u-col span="12">
						<view class="apply-text"><span>可用数量：</span>{{oneMx.AMOUNT_KY}}</view>
					</u-col>
					<u-col span="12">
						<view class="apply-text"><span>包装数量：</span>{{oneMx.UNIT_DABZ}}</view>
					</u-col>

				</u-row>
			</uni-card>

			<!-- <uni-card >
				<u-row gutter="16">
					<u-col span="12">
						<view class="apply-text"><span>箱号：</span>{{oneMx.boxNumber}}</view>
					</u-col>
					<u-col span="12">
						<view class="apply-text"><span>商品名称：</span>{{oneMx.GDNAME}}</view>
					</u-col>
					<u-col span="12">
						<view class="apply-text"><span>商品编码：</span>{{oneMx.GDSEQ}}</view>
					</u-col>
					<u-col span="12">
						<view class="apply-text"><span>生产厂家：</span>{{oneMx.PRODUCERNAME}}</view>
					</u-col>
					<u-col span="12">
						<view class="apply-text"><span>批号：</span>{{oneMx.BATCHNO}}</view>
					</u-col>
				</u-row>
			</uni-card> -->

			<u-form class="form-padding-bottom" v-show="false">
				<!-- <u-form-item label="扫描输入" ref="scanAll" label-width="170" right-icon="">
					<u-input @click="changeScanInput('form.scanAll')" @confirm="resolutionScan"
						v-model="form.scanAll" :focus="scanAllFocus" placeholder="请扫描二维码进行数据填充" />
					<u-button size="mini" shape="circle" @click="scan1('form.scanAll')">扫描</u-button>
				</u-form-item> -->
				<u-form-item label="上游编码" label-width="170" right-icon="">
					<u-input v-model="oneMx.GDSEQ" @blur="blurFunction" :disabled="disableTrue" placeholder="上游编码" />
				</u-form-item>
				<!-- <u-form-item label="商品编码" label-width="170" right-icon="">
					<u-input v-model="oneMx.GOODSID" @blur="blurFunction" :disabled="disableTrue"
						placeholder="商品编码" />
				</u-form-item> -->
				<u-form-item label="商品名称" label-width="170" right-icon="">
					<u-input v-model="oneMx.GDNAME" :title="oneMx.GDNAME" @blur="blurFunction" :disabled="disableTrue"
						placeholder="商品名称" />
				</u-form-item>
				<u-form-item label="商品厂家" label-width="170" right-icon="">
					<u-input v-model="oneMx.PRODUCERNAME" :title="oneMx.PRODUCERNAME" @blur="blurFunction"
						:disabled="disableTrue" placeholder="商品厂家" />
				</u-form-item>
				<!-- @blur="blurFunction" -->
				<u-form-item label="已收/总数量" label-width="170" right-icon="">
					<u-input v-model="oneMx.SHIS_AMOUNT" :title="oneMx.SHIS_AMOUNT" :disabled="disableTrue"
						placeholder="已收" />
					<!-- <view style="color: #999999;display: inline;">/</view> -->
					/
					<u-input v-model="oneMx.AMOUNT" :title="oneMx.AMOUNT" @blur="blurFunction" :disabled="disableTrue"
						placeholder="总数量" />
				</u-form-item>

				<!-- <u-divider color="#fa3534" half-width="400"></u-divider> -->
				<u-form-item label="批号" label-width="170" right-icon="">
					<u-input v-model="oneMx.BATCHNO" @blur="blurFunction" placeholder="请输入批号" />
				</u-form-item>
				<!-- <u-form-item label="生产日期" label-width="170" right-icon="arrow-right">
					<u-calendar v-model="calendaShow" mode="date" @change="changeProductDate"></u-calendar>
					<u-input v-model="oneMx.PRODUCTDATE" @click="calendaShow = true" placeholder="请输入生产日期" />
				</u-form-item>
				<u-form-item label="有效期" label-width="170" right-icon="arrow-right">
					<u-calendar v-model="calendaEffdateShow" mode="date" max-date="9999-01-01"
						@change="changeEFFDATE"></u-calendar>
					<u-input v-model="oneMx.EFFDATE" @click="calendaEffdateShow = true" placeholder="请输入有效期" />
				</u-form-item> -->

				<!-- <u-form-item label="货位" label-width="170" right-icon="">
					<u-input v-model="sjLocation" @blur="blurFunction"  placeholder="请输入货位" />
					<u-button @click="scan1('LOCATIONZD')">扫码</u-button>
						
				</u-form-item> -->
				<!-- <u-form-item label="入库点" label-width="170" right-icon="">
					
					<uni-data-select @showSelector="showSelector($event)" placeholder="请选择线入库点" clear
						v-model="form.landpoint" :localdata="landpointList"
						@change="changeLandpoint"></uni-data-select>
				</u-form-item> -->
				<!-- <u-form-item label="托盘号" label-width="170" right-icon="">
					<u-input @click="changeScanInput('form.tpbar')" v-model="form.tpbar" @blur="blurFunction"
						placeholder="请输入托盘号" />
					<u-button size="mini" shape="circle" @click="scan1('form.tpbar')">扫描</u-button>
				</u-form-item> -->
				<!-- <u-form-item label="上架数量" label-width="170" right-icon="">
					<u-input @click="changeScanInput('sjAmouont')" v-model="sjAmouont" type="number"
						@blur="blurFunction" placeholder="请输入数量" />
				</u-form-item> -->
				<!-- <u-form-item label="卷数" label-width="170" right-icon="">
					<u-input @click="changeScanInput('form.iv_nls')" v-model="form.iv_nls" type="number"
						@blur="blurFunction" placeholder="请输入卷数" />
				</u-form-item> -->

			</u-form>
			<!-- pda现实的数量会很拥挤,这里加点 -->
			<!-- <view style="margin: 200rpx;"></view> -->
			<view v-show="showHeight" style="margin: 360rpx;"></view>

		</view>
		<!-- 	<u-row v-if="current === 1 " gutter="32" class="more-bottom-box" justify="center">

			<u-col span="10">
				<view class="my-button-group">
				
					<u-button class="tow-button" type="primary" shape="circle" @click="searchMx()">查询</u-button>
					<u-button class="more-button" type="primary" shape="circle" @click="submitInbill()()">上架</u-button>
				</view>
			</u-col>
		</u-row> -->
		<u-row v-if="current === 1 " gutter="32" class="more-bottom-box" justify="center">

			<u-col span="10">
				<view class="my-button-group">
					<u-button class="tow-button" type="" shape="circle" @click="searchMx()">查询</u-button>
					<u-button class="tow-button" type="primary" shape="circle" @click="submitInbill()">上架</u-button>
				</view>
			</u-col>
		</u-row>

		<view v-if="current === 2" style="padding-bottom: 120rpx;">
			<view>
				<u-gap height="10" bg-color="#f5f5f5"></u-gap>
				<u-empty v-if="!huojListCenter.length" text="暂无货架,请更改选项查询" mode="page"></u-empty>
				<u-checkbox-group @change="radioGroupChange" v-if="current === 2">
					<u-card v-for="(item, index) in huojListCenter" :key="index" :border="false" padding="20"
						margin="20rpx">
						<view slot="head" style="display: flex;align-items: center;justify-content: space-between;">
							<view style="display: flex;align-items: center;font-size: 30rpx;">
								{{index+1}}. 货架号:{{item.HUOJNO}}
							</view>

							<view style="color: #999999;font-size: 22rpx;">货架面:{{item.ORIENTATIONS}}</view>
							<u-button style="width: 10vh;margin-left: 250rpx;"
								@click="submitReturnBucket('',item.HUOJNO,item.ORIENTATIONS)">返回</u-button>
							<uni-icons style="float: right;" type="forward" size="13"></uni-icons>
						</view>
						<view class="" slot="body">
							<u-row gutter="16">
								<u-col span="6">
									<!-- <view class="apply-text"><span>货位类型：</span>
										{{getItmHuowType(item.HUOW_TYPE)}}
									</view> -->
									<view class="apply-text"><span>货架类型：</span>
										{{getItmHuojType(item.HUOJNO)}}
									</view>
								</u-col>
								<!-- <u-col span="5">
									
									<u-button 
									 type="" class="right-button"
										@click="submitReturnBucket('',item.HUOJNO)">返回</u-button>
								</u-col> -->
								<u-divider color="#fa3534" half-width="400"></u-divider>
								<u-checkbox @change="radioChange" v-model="item.checked" :key="index"
									:name="item.name+'@'+item.ORIENTATIONS">
									<view style="width: 100vh;">
										选择此面货架
									</view>
								</u-checkbox>

							</u-row>
						</view>

					</u-card>
				</u-checkbox-group>
			</view>
			</u-row>
		</view>
		<u-row v-if="current === 2 " gutter="32" class="more-bottom-box" justify="center">
			<!-- submitReturnBucket -->
			<u-col span="10">
				<view><u-button :disabled="!huojListCenter.length" class="more-button" type="primary" shape="circle"
						@click="submitReturnBucketBefore('returnSearch')">货架返回</u-button>
				</view>
			</u-col>
			<!-- <u-col span="10">
				<view><u-button class="more-button" type="primary" shape="circle" @click="submitIn()">上架</u-button>
				</view>
			</u-col> -->
		</u-row>
		<view v-if="current === 3" style="padding-bottom: 120rpx;">
			<u-form :model="form">


				<InHead v-if="refreshInHead" :hzData="hzData">
				</InHead>
				<!-- <ImportMsg>
						</ImportMsg>
						<HzMsg>
						</HzMsg> -->
				<MxMsg v-if="refreshMxMsg" :oneMx="oneMx">
				</MxMsg>


			</u-form>
		</view>
	</view>
</template>
<script>
	import HeadNavBar from '@/components/headnavbar/index';
	import InHead from '@/components/storage-body/in-head';
	import ImportMsg from '@/components/storage-body/import-msg';
	import HzMsg from '@/components/storage-body/hz-msg';
	import MxMsg from '@/components/storage-body/mx-msg';
	import PdaScan from '@/components/pda/pda-sacn/pda-sacn';
	import ErrDialog from '@/components/err-dialog.vue'
	import {
		getLocationTypeList,
		getHuojia,
		getHuojTypeList,
		getZhengsSignList,
		getEfTypeList,
		zhendong,
		tishiyin,
	} from '../../../common/auth'
	import myScan from '@/components/pda/pda-sacn/my-scan'
	// import u-checkbox-group from '../../../uview-ui/components/u-checkbox-group/u-checkbox-group'
	// Vue.component('my-u-checkbox-group',u-checkbox-group)
	export default {
		components: {
			myScan,
			HeadNavBar,
			InHead,
			ImportMsg,
			HzMsg,
			MxMsg,
			PdaScan,
			ErrDialog,
			// u-checkbox-group
		},

		data() {
			return {
				locationTypeList: getLocationTypeList,
				huojTypeList: [{
						text: '普通货位',
						value: '1'
					},
					{
						text: '整托货位',
						value: '2'
					}
				],
				zhengsSignList: getZhengsSignList,
				efTypeList: getEfTypeList,
				userCode: '',
				// 需要判断是哪个输入框
				scanInput: "",
				scanResult: "",
				scanCodeIsShow: true, //控制监听扫描头 组件重新加载
				errDialogOpen: false,
				// 错误信息
				dialogData: {
					title: '入库',
					msgType: '',
					errContent: '',
					confirmText: '',
					functionName: '',
					cancelText: '',
				},
				keywords: '',
				// 货架集合
				huojList: [{
						'HUOJNO': '1',
						'ORIENTATIONS': '2',
						'HUOW_TYPE': '3',
						'value': '1',
						'name': '1',
						checked: false,
					},
					{
						'HUOJNO': '2',
						'ORIENTATIONS': '4',
						'HUOW_TYPE': '3',
						'value': '2',
						'name': '2',
						checked: false,
					}
				],
				// 已经过来的货架
				huojListCenter: [],
				testList: [{
						name: 'apple',
						checked: false,
						disabled: false
					},
					{
						name: 'banner',
						checked: false,
						disabled: false
					},
					{
						name: 'orange',
						checked: false,
						disabled: false
					}
				],
				huojSelected: '',

				form: {
					// 商品条件
					goodsInfo: '',
					boxNumber: '',
					zhengsSign: '2',
					efType: '',
					huojType: '2',
					locationType: '1',
					huoz_id: '',
					inbillNo: '',
					itm: '',
					rwid: '',
					landpoint: '',
					tpbar: '',
					scanAll: '',
					iv_nls: '1',
					kzlLower: '0',
					kzlUpper: '0',
				},
				scanAllFocus: false,
				border: true,
				show: false,
				//库房展示
				kufShow: false,

				// 工作台下拉展示
				gzzShow: false,
				// 当前工作台中文
				gztNowLabel: '',
				GZTID: '',
				kuf: '',
				// 商品相关条件
				goods: '',
				gztList: [],

				// 点位集合
				landpointList: [],
				kufList: [],
				//日历选择显示
				calendaShow: false,
				//有效期日历显示
				calendaEffdateShow: false,
				list: [{
						name: '调取货架'
					}, {
						name: '扫码上架'
					},
					{
						name: '货架返回',
					},
				],
				m2mSimflowList: [],
				m2mOrderFlowList: [],
				current: 0,
				showHeight: false,
				dev: false,
				selectedHuoj: [],
				boxNumberFocus: false,
				inbillForm: {
					boxNumber: '',
					location: '',
				},
				result1: '',
				status: 'nomore',
				iconType: 'circle',
				isDot: false,
				loadText: {
					loadmore: '点击加载更多',
					loading: '正在加载...',
					nomore: '没有更多了'
				},
				// 搜索栏的入库单号
				inbillNo: '',
				nvueWidth: 730,
				only_one: [{
					text: '选择此项',
					value: 0
				}],
				// 基础表单数据
				baseFormData: {
					name: '',
					age: '',
					introduction: '',
					sex: 2,
					hobby: [5],
					datetimesingle: 1627529992399
				},
				hzData: {
					INPAGENO: "",
					INPAGENOYW: "",
					STORAGEID: "",
					INTYPE: "",
					INDATE: ""
				},
				refreshInHead: true,
				refreshMxMsg: true,
				mxList: [

				],
				inbillList: [],
				oneMx: {
					"PRODUCER": "",
					"ITM": 0,
					"SUPNAME": "",
					"INPAGENO_YW": "",
					"SHIS_AMOUNT": 0,
					"EFFDATE": "",

					"INDATE": "",
					"GDSEQ": "",
					"GDMODE": "",
					"PIZNO": "",
					"PRODUCTDATE": "",
					"LOCATIONZD": "",
					"AMOUNT_KY": '',
					"GDSPEC": "",
					"PRODUCERNAME": "",
					"AMOUNT": '',
					"TASKNO": "",
					"INTYPE": "",
					"ZJM": "",
					"UNIT_DABZ": "",
					"BATCHNO": "",
					"INPAGENO": "",
					"GDNAME": "",
					"UNIT": "",
					"DEL_AMOUNT": 0,
					"SUPID": "",
					"LOCATIONZDCOUNT": "",
					"TPBAR": "0",
					"YEW_STATE": "",
					"GOODSID": "",
					"GDSTATUS": "",
					"STORAGEID": "",
					"YEZ_ID": "",
					"STRUCT": "",
					"QUANT": "0",
					'vue_number': '',
				},
				myIndex: '',
				myCgdNo: '',
				disableTrue: true,
				// 入库点
				landpoint: '',
				sjAmouont: '',
				sjLocation: '',
			}
		},
		onLoad(option) {
			// 货架类型默认加载
			// this.form.huojType = uni.getStorageSync("search-bucket-huojType")
			// 空满标识
			this.form.efType = uni.getStorageSync("search-bucket-efType")
			// 



			// this.form.landpoint = uni.getStorageSync("storage-landpoint")
			// if (option) {
			// 	if (option.item) {
			// 		let item = JSON.parse(option.item)
			// 		this.hzData = item
			// 		console.log('收到的:' + JSON.stringify(item))
			// 		console.log('收到的:' + item.INPAGENO)
			// 		this.inbillNo = item.INPAGENO;
			// 		this.getInListOneInfo()
			// 	}
			// }
		},

		created() {
			this.getGzt()
			this.refreshScan()
			this.getLandpointList()
			this.init()
			this.changeScanInput("inbillNo")
			this.getdata()
			if (process.env.NODE_ENV === 'development') {
				this.dev = true
			} else {
				this.dev = false
			}
		},
		// 数据变化适用
		onShow() {
			// this.myShow()

		},
		onBackPress() {
			console.log("点击了返回")
			uni.switchTab({
				url: "/pages/sys/workbench/wms-work"
			})
			return true
		},
		methods: {

			getItmHuowType(type) {
				const list = this.huojTypeList.filter((item) => {
					return item.value === type
				})
				if (list) {
					if (list[0]) {
						return list[0].text
					}
				}
			},
			getItmHuojType(huojno) {
				if (Number(huojno) > 500) {
					return '多层货架'
				} else {
					return '托盘货架'
				}
			},

			// 选中某个复选框时，由checkbox时触发
			checkboxChange(e) {
				console.log(e);
			},
			// 选中任一checkbox时，由checkbox-group触发
			checkboxGroupChange(e) {
				this.selectedHuoj = e
				console.log(e);
			},
			// 全选
			checkedAll() {
				this.testList.map(val => {
					val.checked = true;
				})
			},


			selectHuoj(item, index) {
				if (item.over) {
					this.$u.toast('已完成入库,请选择其他入库单明细')
					return
				} else {
					// let item = this.mxList[index]
					// this.oneMx = item
					// this.getOutInfoByTpbar()
					console.log('item:' + JSON.stringify(item))
					// item.index = Number(index + 1)
					// // this.oneMx = item
					// // tabs转换到第一个
					// this.change(1)
				}

				// let id = item.INPAGENO
				// uni.navigateTo({
				// 	url: 'index?item=' + JSON.stringify(item)
				// });
			},
			// 选中某个单选框时，由radio时触发
			radioChange(e) {
				// console.log("单个选项:"+JSON.stringify(e));

			},
			// 选中任一radio时，由radio-group触发
			// radioGroupChange(e) {
			// 	console.log(e);
			// },
			radioGroupChange(evt) {
				this.selectedHuoj = evt
				console.log(evt);
				if (this.huojList) {
					this.huojListCenter = this.huojList.filter((item) => {
						const huojAndWorkface = item.HUOJNO + '@' + item.ORIENTATIONS
						return this.selectedHuoj.indexOf(huojAndWorkface) != -1
					})
				}

			},
			getdata() {
				this.getHuojList()
				this.getHuojListed()
			},
			// 获取工作站已到达货架
			getHuojListed() {

				// 1、用户id,
				// 2、工作台id传工作站编号

				const USER_ID = uni.getStorageSync('USER_ID')
				const GZTID = this.GZTID ? this.GZTID : "%"

				let param = USER_ID + "," + GZTID;
				console.log("iv_parm:" + param)
				let that = this
				this.$u.api.general({
						iv_code: "GETGZTHJLIST",
						iv_parm: param
					})
					.then(res => {
						console.log("返回的res:" + JSON.stringify(res))
						if (res.success) {
							let data = res.data
							console.log("返回的data:" + JSON.stringify(data))
							if (!data) {
								return
							}
							//补充text
							// this.huojListCenter = data
							//checked: false,
							//	disabled: false
							this.huojListCenter = data.map(v => {
								this.selectedHuoj.push(v.BUCKETCODE + '@' + v.WORKFACE);
								this.$set(v, 'checked', true) // https://vuejs.org/v2/guide/reactivity.html
								this.$set(v, 'disabled', false)
								this.$set(v, 'HUOJNO', v.BUCKETCODE)
								this.$set(v, 'ORIENTATIONS', v.WORKFACE)
								this.$set(v, 'HUOW_TYPE', 1)
								// if(v.JOB_STATUS === '2'){
								this.$set(v, 'value', v.BUCKETCODE + v.WORKFACE)
								this.$set(v, 'name', v.BUCKETCODE + v.WORKFACE)
								return v
								// }
								//HUOJNO+ORIENTATIONS+HUOW_TYPE


							})

							if (this.huojListCenter.length < 1) {
								// this.$u.toast("暂无数据");
							}
							this.status = 'nomore';
						} else {
							this.dialogData = {
								title: '获取工作站已到达货架',
								msgType: 'warn',
								errContent: res.msg,
								confirmText: '重试',
								// 如果选右边的执行的返回方法
								functionName: 'getHuojListed',
								cancelText: '关闭',
							}
							this.errDialogShow()
						}
					});
			},

			getHuojList() {


				// 1、IV\_STORAGEID 仓库
				// 2、IV_STAFF 用户id 
				// 3、IV_GZTID 工作台id,
				// 4、IV_HUOJ_NO 货架（货架信息，不指定传%）
				// 5、IV_CZLX 操作类型：1：入库2：出库3：盘点

				// 6、IV_QUY_NO  区域传%
				// 7、IV_YEZ_ID 业主传%
				// 8、IV_HUOW_TYPE 货位类型：1普通货位
				// 9、IV_ZHENGS_SIGN 整散标识 传2
				// 10、IV_EF_TYPE 是否空货位

				// 11、IV_GDTJ 商品条件
				// 12、IN_KZL_LOWER 占用下限
				// 13、IN_KZL_UPPER 占用上限
				// 14、IV_BARCODE  箱码
				const STORAGE_ID = uni.getStorageSync('STORAGE_ID')
				const USER_ID = uni.getStorageSync('USER_ID')
				const GZTID = this.GZTID ? this.GZTID : "%"
				const HUOJ_NO = this.form.huoj ? this.form.huoj : '%'
				const CZLX = '1'

				const QUY_NO = '%'
				const YEZ_ID = '%'
				const HUOW_TYPE = this.form.huojType ? this.form.huojType : ''
				const zhengsSign = this.form.zhengsSign ? this.form.zhengsSign : ''
				// 空满标识
				const efType = this.form.efType ? this.form.efType : ''


				// 商品条件
				const gdtj = this.form.goodsInfo ? this.form.goodsInfo : ''

				const kzl_lower = this.form.kzlLower ? this.form.kzlLower : '0'
				const kzl_upper = this.form.kzlUpper ? this.form.kzlUpper : '100'
				const boxNumber = this.form.boxNumber ? this.form.boxNumber : ''


				let param = STORAGE_ID + "," + USER_ID + "," + GZTID + "," + HUOJ_NO + "," + CZLX + "," +
					QUY_NO + "," + YEZ_ID + "," + HUOW_TYPE + "," + zhengsSign + "," + efType + "," +
					gdtj + "," + kzl_lower + "," + kzl_upper + "," + boxNumber;
				console.log("iv_parm:" + param)
				let that = this
				this.$u.api.general({
						iv_code: "HJQUERY",
						iv_parm: param
					})
					.then(res => {
						console.log("返回的res:" + JSON.stringify(res))
						if (res.success) {
							let data = res.data
							console.log("返回的data:" + JSON.stringify(data))
							//补充text
							this.huojList = data
							//checked: false,
							//	disabled: false
							this.huojList = data.map(v => {
								this.$set(v, 'checked', false) // https://vuejs.org/v2/guide/reactivity.html
								this.$set(v, 'disabled', false)

								this.$set(v, 'value', v.HUOJNO + v.ORIENTATIONS)
								this.$set(v, 'name', v.HUOJNO + v.ORIENTATIONS)
								return v
							})
							if (this.huojList.length < 1) {
								this.$u.toast("暂无数据,尝试切换其他工作站");
							}
							this.status = 'nomore';
						} else {
							this.dialogData = {
								title: '获取货架列表',
								msgType: 'warn',
								errContent: res.msg,
								confirmText: '重试',
								// 如果选右边的执行的返回方法
								functionName: 'getHuojList',
								cancelText: '关闭',
							}
							this.errDialogShow()
						}
					});
			},
			getBucketList() {
				// 1、IV\_STAFF 用户id
				// 2、IV\_GZTID 工作站id
				// 3、IV\_HUOJ\_NO 指定货架
				// 4、IV\_CZLX 操作类型：1入2出3盘6移
				// 5、IV\_QUY\_NO 库区
				// 6、IV\_YEZ\_ID 业主id
				// 7、IV\_HUOW\_TYPE 货位类型：1:普通货位 2:整托货位 3:暂存货位 4:第三方货位5:料箱货位
				// 8、IV\_ZHENGS\_SIGN 整散标识：1整2零
				// 9、IV\_EF\_TYPE 空满标识：Y空N非空
				// 10、IV\_UNQBAR 入库托盘码或者商品码
				// 11、IN\_KZL\_LOWER 货架占用低比例：0等到100
				// 12、IN\_KZL\_UPPER 货架占用高比例：0等到100
				const USER_ID = uni.getStorageSync('USER_ID')
				const GZTID = this.GZTID ? this.GZTID : "%"
				const kuf_no = this.form.huoj ? this.form.huoj : '%'
				const czlx = '1'
				const quyu_no = this.form.quyu_no ? this.form.quyu_no : '%'
				const yez_id = '%'
				const huojType = this.form.huojType ? this.form.huojType : '%'
				const zhengsSign = this.form.zhengsSign ? this.form.zhengsSign : '%'
				const efType = this.form.efType ? this.form.efType : '%'
				const UNQBAR = '%'
				const kzl_lower = this.form.kzlLower ? this.form.kzlLower : '0'
				const kzl_upper = this.form.kzlUpper ? this.form.kzlUpper : '100'



				let param = USER_ID + "," +
					GZTID + "," +
					kuf_no + "," +
					czlx + "," +
					quyu_no + "," +
					yez_id + "," +
					huojType + "," +
					zhengsSign + "," +
					efType + "," +
					UNQBAR + "," +
					kzl_lower + "," +
					kzl_upper;
				console.log("iv_parm:" + param)
				let that = this
				this.$u.api.general({
						iv_code: "HJQUERY",
						iv_parm: param
					})
					.then(res => {
						console.log("返回的res:" + JSON.stringify(res))
						if (res.success) {
							let data = res.data
							console.log("返回的data:" + JSON.stringify(data))
							//补充text
							this.hzList = data
							if (this.hzList.length < 1) {
								this.$u.toast("暂无数据");
							}
							this.status = 'nomore';


						} else {
							this.dialogData = {
								title: '调取货架',
								msgType: 'warn',
								errContent: res.msg,
								confirmText: '重试',
								// 如果选右边的执行的返回方法
								functionName: 'getBucketList',
								cancelText: '关闭',
							}
							this.errDialogShow()
						}
					});
			},
			// 批量调取
			submitSelectedHuojs() {
				const allHuoj = this.selectedHuoj
				for (let i = 0; i < allHuoj.length; i++) {
					console.log("货架号:" + allHuoj[i])
					const huojAndWorkface = allHuoj[i].split('@')
					this.submitGetHuojList('', huojAndWorkface[0],
						huojAndWorkface[1]);
				}
			},
			// 离线货架调取
			submitGetHuojList(paramReturn, selectedHuoj, workface) {

				// 1、IV\_STAFF 用户id
				// 2、IV\_GZTID 工作站id
				// 3、IV\_HUOJ\_NO 指定货架
				// 货架面
				// 4、IV\_CZLX 操作类型：1入2出3盘6移

				const USER_ID = uni.getStorageSync('USER_ID')
				const GZTID = this.GZTID ? this.GZTID : "%"
				const HUOJ_NO = selectedHuoj
				const workFace = workface
				const CZLX = '1'

				// 空满标识
				// const efType = this.form.efType ? this.form.efType : ''
				// // 商品条件
				// const gdtj=this.form.goodsInfo ?this.form.goodsInfo :''

				// const kzl_lower = this.form.kzlLower ? this.form.kzlLower : '0'
				// const kzl_upper = this.form.kzlUpper ? this.form.kzlUpper : '100'
				// const boxNumber = this.form.boxNumber ? this.form.boxNumber :''

				let param = USER_ID + "," + GZTID + ',' + HUOJ_NO + "," + workFace + "," +
					CZLX;
				console.log("iv_parm:" + param)
				// return
				let that = this
				this.$u.api.prcutlexecvar({
						iv_code: "CALLZDHJ",
						iv_parm: param,
						ov_var1: '2',
						ov_var2: '2',
						ov_var3: '2',
						ov_var4: '2',
						ov_var5: '2',
					})
					.then(res => {
						console.log("返回的res:" + JSON.stringify(res))
						if (res.success) {
							that.$u.toast(res.msg);
							let data = res.data
							// console.log("返回的data:" + JSON.stringify(data))
							console.log("返回的res.msg:" + res.msg)
							this.current = 1
							this.zendong()
							this.tishiyin()
							// this.submitSuccess()
							if (paramReturn == "returnSearch") {
								this.current = 0
							}
						} else {
							this.dialogData = {
								title: '离线货架调取',
								msgType: 'error',
								errContent: res.msg,
								confirmText: '重新提交',
								// 如果选右边的执行的返回方法
								functionName: 'submitGetHuojList',
								cancelText: '关闭',
								closeFunction: '',
							}
							this.errDialogShow()
						}

					});
			},
			// 货架返回后,从选择的货架中移除已经提交过的货架和面
			removeHuojAndWorkface(huojno, workface) {

				this.selectedHuoj = this.selectedHuoj.filter((item) => {
					return item !== huojno + '@' + workface
				})
				//huojListCenter
				this.removeHuojAndWorkfaceOfHuojList(huojno, workface)
				this.removeHuojAndWorkfaceOfCenterHuojList(huojno, workface)
			},
			// 移除选中的货架和面
			removeHuojAndWorkfaceOfHuojList(huojno, workface) {
				this.huojList = this.huojList.map(v => {
					const huojAndFace = huojno + workface
					// debugger
					if (huojAndFace === v.HUOJNO + v.ORIENTATIONS) {
						// debugger
						this.$set(v, 'checked', false)
					}
					return v
				})
			},
			removeHuojAndWorkfaceOfCenterHuojList(huojno, workface) {
<<<<<<< HEAD

=======
		
>>>>>>> 67c8ac6b418dd6104f97728e3349749fa20a30bf
				// this.huojListCenter = this.huojListCenter.map(v => {
				// 	const huojAndFace = huojno + workface
				// 	if (huojAndFace === v.HUOJNO + v.ORIENTATIONS) {
				// 		this.$set(v, 'checked', false)
				// 	}
				// 	return v
				// })
<<<<<<< HEAD

				this.huojListCenter = this.huojListCenter.filter((item) => {
					return item.HUOJNO + item.ORIENTATIONS !== huojno + workface
				})

=======
	
				this.huojListCenter = this.huojListCenter.filter((item) => {
					return item.HUOJNO + item.ORIENTATIONS  !==  huojno + workface
				})
				
>>>>>>> 67c8ac6b418dd6104f97728e3349749fa20a30bf
			},

			// 返回勾选的,批量返回
			submitReturnBucketBefore() {
				const allHuoj = this.selectedHuoj
				for (let i = 0; i < allHuoj.length; i++) {
					console.log("货架号:" + allHuoj[i])
					const huojAndWorkface = allHuoj[i].split('@')
					this.submitReturnBucket('', huojAndWorkface[0], huojAndWorkface[1]);

				}
			},
			// 单个货架返回
			submitReturnBucket(paramReturn, huojno, workface) {
				// 1、IV\_STAFF 用户id
				// 2、IV\_GZTID 工作站id
				// 3、IV\_HUOJNO 指定货架
				console.log("返回=>" + JSON.stringify(huojno + '@' + workface))

				// return;
				const USER_ID = uni.getStorageSync('USER_ID')
				const GZTID = this.GZTID
				const HUOJNO = huojno

				let param = USER_ID + "," +
					GZTID + "," +
					HUOJNO;

				console.log("iv_parm:" + param + ";")
				let that = this
				// this.removeHuojAndWorkface(huojno,workface)
				// return
				this.$u.api.prcutlexecvar({
						iv_code: "HJBACK",
						iv_parm: param,
						ov_var1: '2',
						ov_var2: '2',
						ov_var3: '2',
						ov_var4: '2',
						ov_var5: '2',
					})
					.then(res => {
						console.log("返回的res:" + JSON.stringify(res))

						if (res.success) {
							that.$u.toast(res.msg);
							let data = res.data
							// console.log("返回的data:" + JSON.stringify(data))
							console.log("返回的res.msg:" + res.msg)
							// this.submitSuccess()
							this.removeHuojAndWorkface(huojno, workface)
							if (paramReturn == "returnSearch") {
								this.current = 0
							}
						} else {
							this.dialogData = {
								title: '货架返回提交',
								msgType: 'error',
								errContent: res.msg,
								confirmText: '重新提交',
								// 如果选右边的执行的返回方法
								functionName: 'submitReturnBucket',
								cancelText: '关闭',
								closeFunction: '',
							}
							this.errDialogShow()
						}

					});
			},

			// 根据箱号,获取


			changeEfType(e) {
				this.form.efType = e
				uni.setStorageSync("search-bucket-efType", e)
				console.log("调取货架缓存空满类型:" + uni.getStorageSync("search-bucket-efType"))
				this.showHeight = false
				// this.searchHz()
			},
			changeZhengsSign(e) {
				this.form.zhengsSign = e
				uni.setStorageSync("search-bucket-zhengsSign", e)
				console.log("调取货架缓存整散类型:" + uni.getStorageSync("search-bucket-zhengsSign"))
				this.showHeight = false
				// this.searchHz()
			},
			changeHuojType(e) {
				this.form.huojType = e
				uni.setStorageSync("search-bucket-huojType", e)
				console.log("调取货架缓存货架类型:" + uni.getStorageSync("search-bucket-huojType"))
				this.showHeight = false
				// this.searchHz()
			},
			changeLocationType(e) {
				this.form.locationType = e
				uni.setStorageSync("search-bucket-locationType", e)
				console.log("调取货架缓存货架类型:" + uni.getStorageSync("search-bucket-locationType"))
				this.showHeight = false
				// this.searchHz()
			},
			scanCode(res) {
				console.log("父scanCode 收到的数据:" + res)
				this.resultCode(res)
			},
			resultCode(res) {
				this.scanResult = JSON.stringify(res)
				this.changeScanValue()
			},


			changeLandpoint(e) {
				// this.form.landpoint = e
				// console.log("e:"+e)
				// uni.setStorageSync("storage-landpoint", e)
				// console.log("线边仓制单缓存作业场景:" + uni.getStorageSync("storage-landpoint"))
				// // 选择后，可以选择线边仓工作站
				// // this.notChangeLine = false
				// // this.getLineGzt()
				// this.showSelector(false)

				this.form.landpoint = e
				uni.setStorageSync("storage-landpoint", e)
				console.log("线边仓制单缓存作业场景:" + uni.getStorageSync("storage-landpoint"))
				// 选择后，可以选择线边仓工作站
				// this.notChangeLine = false
				// this.getLineGzt()
				this.showSelector(false)
			},
			// 下拉内容是否展开
			showSelector(res) {
				console.log(res)
				this.showHeight = res
			},
			retryFunciton(e) {
				console.log("子组件返回的e:" + e)
				if (e == "getHuojList") {
					this.getHuojList()
				} else if (e == "submitCheck") {
					this.submitCheck()
				} else if (e == "submitInbill") {
					this.submitInbill()
					//submitInbill
				} else if (e == "getHuojListed") {
					this.getHuojListed()
<<<<<<< HEAD
				} else if (e == "getMessage") {
=======
				} else if(e == "getMessage"){
>>>>>>> 67c8ac6b418dd6104f97728e3349749fa20a30bf
					this.getMessage()
				}
			},
			navTo(url) {
				uni.switchTab({
					url: url,
					success: function(e) {
						var page = getCurrentPages().pop(); // 返回页面数组的最后一个页面数据
						if (page == undefined || page == null)
							return; //如果最后一个页面为undefined或null，即当前就在首页 return出去，不调用onLoad
						page.onLoad();
					}
				});


			},
			changeFocusToBoxNumber() {
				console.log('焦点到箱号输入框')
				this.boxNumberFocus = true
				this.changeScanInput('inbillForm.boxNumber')
			},
			searchMx() {
				// this.getInListOneInfo()
				this.getMxByBoxNumber()
				// this.submitInbill()
			},
			getMxByBoxNumber() {
				// this.zhendong()
				// this.tishiyin()
				// this.changeFocusToBoxNumber()
				// 1、IV\_STORAGEID 仓库id,
				// 2、IV\_TPBAR 托盘号
				// 3、IV\_USER\_ID 用户id
				const STORAGE_ID = uni.getStorageSync('STORAGE_ID')
				const boxNumber = this.inbillForm.boxNumber ? this.inbillForm.boxNumber : '%'

				// if(boxNumber=='%'){
				// 	this.$u.toast("请输入箱号信息");
				// 	return
				// }
				const USER_ID = uni.getStorageSync('USER_ID')

				let param = STORAGE_ID + "," + boxNumber + "," + USER_ID;
				console.log("iv_parm:" + param)
				let that = this
				this.$u.api.general({
						iv_code: "PDAAXINBILLDISP",
						iv_parm: param
					})
					.then(res => {
						console.log("返回的res:" + JSON.stringify(res))
						if (res.success) {
							let data = res.data
							console.log("返回的data:" + JSON.stringify(data))
							//补充text
<<<<<<< HEAD

							// if (!data.data) {
							// 	this.$u.toast("暂无数据,或此任务已完成");
							// 	return
							// }
							if (!data) {
								this.$u.toast("暂无数据");
=======
							
							if(!data.data){
								this.$u.toast("暂无数据,或此任务已完成");
>>>>>>> 67c8ac6b418dd6104f97728e3349749fa20a30bf
								return
							}

							data = data.map(v => {
								let vue_number = Number(v.AMOUNT) / Number(v.UNIT_DABZ)
								console.log("计算的箱数" + vue_number)
								this.$set(v, 'vue_number',
									vue_number) // https://vuejs.org/v2/guide/reactivity.html
								this.$set(v, 'disabled', false)

								return v
							})
							this.oneMx = data[0]
							if (this.huojList.length < 1) {
								this.$u.toast("暂无数据");
							}
							this.status = 'nomore';
						} else {
							this.dialogData = {
								title: '获取箱子信息',
								msgType: 'warn',
								errContent: res.msg,
								confirmText: '重试',
								// 如果选右边的执行的返回方法
								functionName: 'getMxByBoxNumber',
								cancelText: '关闭',
							}
							this.errDialogShow()
						}
					});
			},
			overStyle(over) {
				if (over) {
					return "text-align: right;color: #58ca93;";
				} else {
					return "text-align: right;color: #f28c03;";
				}
			},
			init() {
				this.GZTID = uni.getStorageSync('IN_GZTID')
				this.kuf = uni.getStorageSync('kuf')
			},
			goTo(item, index) {
				if (item.over) {
					this.$u.toast('已完成入库,请选择其他入库单明细')
					return
				} else {
					let item = this.mxList[index]
					if (this.inbillNo.length > 0) {

					} else {
						// 通过点击明细,输入了入库单号,以及 预览的一些数据
						this.inbillNo = item.INPAGENO
						this.getInListByInbillNo()
					}
					console.log('item:' + JSON.stringify(item))
					item.index = Number(index + 1)
					this.oneMx = item
					this.myIndex = index
					this.myCgdNo = item.INPAGENO + "#" + item.ITM
					console.log('保存过滤条件：' + JSON.stringify(this.myCgdNo))
					// tabs转换到第一个
					this.change(1)
					// 获取焦点并直接扫描
					this.scanAllFocus = true
					this.changeScanInput('form.scanAll')
					this.removeSomeOneMx()

				}

				// let id = item.INPAGENO
				// uni.navigateTo({
				// 	url: 'index?item=' + JSON.stringify(item)
				// });
			},
			// 清空部分明细
			removeSomeOneMx() {
				this.form.scanAll = ''
				// this.oneMx.BATCHNO=''
				// this.oneMx.PRODUCTDATE = ''
				// this.oneMx.EFFDATE = ''
				this.sjAmouont = ''
			},

			getInListByInbillNo() {
				const STORAGE_ID = uni.getStorageSync('STORAGE_ID')
				const huoz_id = "%"
				const USER_ID = uni.getStorageSync('USER_ID')
				const inbillNumber = this.inbillNo ? this.inbillNo : "%"

				const unit = "%"
				const goodsId = "%"
				const palletNumber = "%"
				let param = STORAGE_ID + "," + huoz_id + "," + USER_ID + "," +
					inbillNumber + "," + unit + "," + goodsId + "," + palletNumber;
				console.log("iv_parm:" + param)
				this.$u.api.general({
						iv_code: "PDAINBILLINPAGENO",
						iv_parm: param
					})
					.then(res => {
						// console.log("返回的res:" + JSON.stringify(res))
						let data = res.data
						console.log("返回的data:" + JSON.stringify(data))
						if (res.success) {
							this.hzData = data[0]
							// if (this.list.length < 1) {
							// 	this.$u.toast("没有查到数据");
							// }
						} else {
							this.$u.toast(res.msg);
						}
					});
			},
			//重新加载子组件
			myShow() {

				// console.log("this.hzData==>" + JSON.stringify(this.hzData))
				// //刷新显示
				// let that = this;
				// that.refreshInHead = false;
				// that.$nextTick(() => {
				// 	that.refreshInHead = true;
				// })

			},
			// 刷新扫描组件
			refreshScan() {
				this.scanCodeIsShow = false;
				this.$nextTick(() => {
					this.scanCodeIsShow = true;
				})
			},
			myMxShow() {
				//刷新显示
				let that = this;
				that.refreshMxMsg = false;
				that.$nextTick(() => {
					that.refreshMxMsg = true;
				})

			},
			errDialogShow() {
				console.log("刷新显示提示框")
				//刷新显示
				let that = this;
				that.errDialogOpen = false;
				that.$nextTick(() => {
					that.errDialogOpen = true;
				})

			},
			resolutionScan() {
				console.log("解析")
				let scanResult = this.form.scanAll

				if (scanResult.match("&&")) {

					if (scanResult) {
						let result = scanResult.split("&&")
						// 物料编码
						let goodsId = result[0]
						// 物料名称
						let gdname = result[1]
						// 供应商代码
						let gysId = result[2]
						// 物料批次
						let itemid = result[3]
						// 订单号
						let inbillno = result[4]
						// 数量
						let amount = Number(result[5])
						// 出场检验日期
						let productdate = result[6]

						if (goodsId) {
							if (goodsId !== this.oneMx.GDSEQ) {
								this.$u.toast('扫描内容与当前商品id不对应');
								return
							}
						}
						this.oneMx.PRODUCTDATE = productdate ? productdate : ''
						// this.oneMx.BZQ = 2
						if (this.oneMx.BZQ) {
							const _this = this
							var date1 = productdate;
							var date2 = new Date(date1);
							date2.setMonth(Number(date1.split("-")[1]) + Number(this.oneMx.BZQ));

							// var dateBegin = date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + date1.getDate()
							var dateEnd = date2.getFullYear() + "-" + (date2.getMonth() + 1) + "-" + date2.getDate()
							// console.log(dateBegin );
							// console.log(dateEnd);
							this.oneMx.EFFDATE = dateEnd
						} else {
							this.$u.toast('保证期(bzq为空),扫描赋值有效期错误');
						}
						this.oneMx.BATCHNO = itemid ? itemid : '0'

						console.log("amount:" + amount)

						// 输入框的数量
						this.sjAmouont = amount ? amount : '0'

					}
				}
			},
			scan1(param) {
				console.log("扫描")
				// #ifdef H5
				this.$u.toast('H5页面不支持扫码,请用安卓等移动设备重试')
				// #endif
				let that = this;
				// 允许从相机和相册扫码
				uni.scanCode({
					success: function(res) {
						if (param == "inbillNo") {
							that.inbillNo = res.result;
						} else if (param == "LOCATIONZD") {
							that.sjLocation = res.result
						} else if (param == "form.tpbar") {
							that.form.tpbar = res.result
						} else if (parm == "form.scanAll") {
							that.form.scanAll = res.result
						}

					}
				});
			},
			change(index) {
				console.log(this.current)
				// 弥补当一个页面同时出现两个全选内容的时候,直接切换页面会丢失css,需要在中间停顿一下
				if (index !== 1) {
					this.current = 1;
					setTimeout(() => {
						this.current = index;
					}, 100);
				} else {
					this.current = 1;
				}

			},
			// // 震动
			// zhendong() {
			// 	// 长震动
			// 	uni.vibrateLong({
			// 		success: function() {
			// 			console.log('success');
			// 		}
			// 	});

			// },
			// // 提示音
			// tishiyin() {
			// 	let main = plus.android.runtimeMainActivity();
			// 	let RingtoneManager = plus.android.importClass("android.media.RingtoneManager");
			// 	let uri = RingtoneManager.getActualDefaultRingtoneUri(main, RingtoneManager
			// 		.TYPE_NOTIFICATION);
			// 	let MediaPlayer = plus.android.importClass("android.media.MediaPlayer");
			// 	let player = MediaPlayer.create(main, uri);
			// 	player.setLooping(false);
			// 	player.prepare();
			// 	player.start();
			// },
			zidiyingTishiyin() {
				const innerAudioContext = uni.createInnerAudioContext();
				innerAudioContext.autoplay = true;
				innerAudioContext.src = '/static/y974.mp3'; //铃声文件的路径
				innerAudioContext.onPlay(() => {
					console.log('开始播放');
				});
				innerAudioContext.onError((res) => {
					console.log(res.errMsg);
					console.log(res.errCode);
				});
			},
			submitMyInbill() {
				//1、IV\_STORAGEID 仓库编号,
				// 2、IV\_GZTID 工作台
				// 3、IV\_USER\_ID 用户编号
				// 4、IV\_INPAGENO 入库单号
				// 5、IV\_ITM 行号
				// 6、IV\_BATCHNO 批号
				// 7、IV\_PRODUCTDATE 生产日期
				// 8、IV\_EFFDATE 有效期
				// 9、IV\_PRODUCTDATE\_PRINT 打印生产日期
				// 10、IV\_EFFDATE\_PRINT 打印有效日期
				// 11、IN\_AMOUNT 数量
				// 12、IV\_TPBAR 托盘号
				// 13、IV\_LOCATION 指定货位
				// 14、IV\_GOODSTATUS 质量状态
				// 15、IV\_KUB 库别
				// 16、IV\_KUF\_NO 库房
				// 17、IV\_QUY\_NO 区域
				// 18、IV\_UNIQUECODE 唯一码
				// 19、IV\_BGZID 保管账：默认1
				// 20、IV\_NLS 内联数
				// 21、IV\_YWZT 业务状态
				// 22、IV_LANDPOINT 入库点
				// this.$u.toast('待开发');
				// return
				const STORAGE_ID = uni.getStorageSync('STORAGE_ID')
				const GZTID = this.GZTID
				const USER_ID = uni.getStorageSync('USER_ID')
				const INPAGENO = this.oneMx.inpageno ? this.oneMx.inpageno : ''
				const ITM = this.oneMx.ITM
				const BATCHNO = this.oneMx.BATCHNO
				const PRODUCTDATE = this.oneMx.PRODUCTDATE
				const EFFDATE = this.oneMx.EFFDATE
				const PRODUCTDATE_PRINT = this.oneMx.PRODUCTDATE_PRINT
				const EFFDATE_PRINT = this.oneMx.EFFDATE_PRINT
				const AMOUNT = this.oneMx.AMOUNT
				const TPBAR = this.oneMx.TPBAR
				const Location = this.inbillForm.location
				if (!location) {
					this.$u.toast('请输入货位号')
					return;
				}
				const GOODSTATUS = this.oneMx.GOODSTATUS
				const KUB = this.oneMx.KUB
				const KUF_NO = this.oneMx.KUF_NO
				const QUY_NO = this.oneMx.QUY_NO
				const UNIQUECODE = this.oneMx.UNIQUECODE
				const BGZID = this.oneMx.BGZID
				const NLS = this.oneMx.NLS
				const YWZT = this.oneMx.YWZT
				const LANDPOINT = this.oneMx.LANDPOINT


				// const boxNumber = this.inbillForm.boxNumber
				// const location = this.inbillForm.location

				let param = STORAGE_ID + "," +
					GZTID + "," +
					USER_ID + "," +
					INPAGENO + "," +



					ITM + "," +
					BATCHNO + ","

					+
					PRODUCTDATE + "," +
					EFFDATE + "," +
					PRODUCTDATE_PRINT + "," +
					EFFDATE_PRINT + ","

					+
					AMOUNT + "," +
					TPBAR + "," +
					Location + "," +
					GOODSTATUS + ","

					+
					KUB + "," +
					KUF_NO + "," +
					QUY_NO + ","

					+
					UNIQUECODE + "," +
					BGZID + "," +
					NLS + "," +
					YWZT + "," +
					LANDPOINT;

				console.log("iv_parm:" + param + ";")
				let that = this
				this.$u.api.prcutlexecvar({
						iv_code: "PDAAXINBILLDISP",
						iv_parm: param,
						ov_var1: '2',
						ov_var2: '2',
						ov_var3: '2',
						ov_var4: '2',
						ov_var5: '2',
					})
					.then(res => {
						console.log("返回的res:" + JSON.stringify(res))

						if (res.success) {
							that.$u.toast(res.msg);
							let data = res.data
							console.log("返回的res.msg:" + res.msg)

							this.submitSuccess()
							if (paramReturn == "returnSearch") {
								//回到明细列表
								this.current = 0
							}
							//直接点击第一个
							// this.goTo(0,0)
							// this.getNextMx()
						} else {

							this.dialogData = {
								title: '入库失败',
								msgType: 'error',
								errContent: res.msg,
								confirmText: '重新提交入库',
								functionName: 'submitMyInbill',
								cancelText: '关闭',
							}
							this.errDialogShow()
						}

					});
			},

			submitInbill() {
				//1、IV\_STORAGEID 仓库编号,
				// 2、IV\_GZTID 工作台
				// 3、IV\_USER\_ID 用户编号
				// 4、IV_BARCODE 箱号
				// 5、IV_LOCATION 货位
				// this.$u.toast('待开发');
				// return
				const STORAGE_ID = uni.getStorageSync('STORAGE_ID')
				const gztid = this.GZTID
				const USER_ID = uni.getStorageSync('USER_ID')
				const boxNumber = this.inbillForm.boxNumber
				const location = this.inbillForm.location
				const number = this.oneMx.vue_number
				if ((number * Number(this.oneMx.UNIT_DABZ)) > this.oneMx.AMOUNT) {
					this.$u.toast('[实际上架件数] 过大 .上架件数应该小于 数量除以包装数量 ')
					return
				}
				// 可用数量
				const amount_ky = number * Number(this.oneMx.UNIT_DABZ)
				let param = STORAGE_ID + "," +
					gztid + "," +
					USER_ID + "," +
					boxNumber + "," +
					location + ',' +
					amount_ky;
				console.log("iv_parm:" + param + ";")
				let that = this
				this.$u.api.prcutlexecvar({
						iv_code: "PDAINBILLAXSH",
						iv_parm: param,
						ov_var1: '2',
						ov_var2: '2',
						ov_var3: '2',
						ov_var4: '2',
						ov_var5: '2',
					})
					.then(res => {
						console.log("返回的res:" + JSON.stringify(res))

						if (res.success) {
							that.$u.toast(res.msg);
							let data = res.data
							console.log("返回的res.msg:" + res.msg)

							this.submitSuccess()
							if (paramReturn == "returnSearch") {
								//回到明细列表
								this.current = 0
							}
							//直接点击第一个
							// this.goTo(0,0)
							// this.getNextMx()
						} else {

							this.dialogData = {
								title: '入库失败',
								msgType: 'error',
								errContent: res.msg,
								confirmText: '重新提交入库',
								functionName: 'submitInbill',
								cancelText: '关闭',
							}
							this.errDialogShow()
						}

					});
			},
			// 获取信息
			getMessage() {
<<<<<<< HEAD
				// 1、iv_staff 人员,
				// 2、cntr_nbr 箱号
				const USER_ID = uni.getStorageSync('USER_ID')
				const boxNumber = this.inbillForm.boxNumber
				if (!boxNumber) {
=======
			// 1、iv_staff 人员,
			// 2、cntr_nbr 箱号
				const USER_ID = uni.getStorageSync('USER_ID')
				const boxNumber = this.inbillForm.boxNumber
				if(!boxNumber){
>>>>>>> 67c8ac6b418dd6104f97728e3349749fa20a30bf
					this.$u.toast("请先输入箱号")
					return;
				}
				let param = USER_ID + "," +
<<<<<<< HEAD
					boxNumber;
=======
					boxNumber ;
>>>>>>> 67c8ac6b418dd6104f97728e3349749fa20a30bf
				console.log("iv_parm:" + param + ";")
				let that = this
				this.$u.api.prcutlexecvar({
						iv_code: "CALLINBILLINFO",
						iv_parm: param,
						ov_var1: '2',
						ov_var2: '2',
						ov_var3: '2',
						ov_var4: '2',
						ov_var5: '2',
					})
					.then(res => {
						console.log("返回的res:" + JSON.stringify(res))
						if (res.success) {
							that.$u.toast(res.msg);
							let data = res.data
							console.log("返回的res.msg:" + res.msg)
							// this.submitSuccess()
							// if (paramReturn == "returnSearch") {
							// 	//回到明细列表
							// 	this.current = 0
							// }
						} else {
<<<<<<< HEAD

=======
			
>>>>>>> 67c8ac6b418dd6104f97728e3349749fa20a30bf
							this.dialogData = {
								title: '获取信息失败',
								msgType: 'error',
								errContent: res.msg,
								confirmText: '重新获取信息',
								functionName: 'getMessage',
								cancelText: '关闭',
							}
							this.errDialogShow()
						}
<<<<<<< HEAD

					});
			},


=======
			
					});
			},
			
			
>>>>>>> 67c8ac6b418dd6104f97728e3349749fa20a30bf

			submit(index) {
				if (this.inbillNo) {
					this.$u.toast('调用上架接口')
				} else {
					this.$u.toast('请补充入库单号的数据')
				}
			},


			submitIn(paramReturn) {
				// 1、IV\_STORAGEID 仓库编号,
				// 2、IV\_GZTID 工作台
				// 3、IV\_USER\_ID 用户编号
				// 4、IV\_INPAGENO 入库单号
				// 5、IV\_ITM 行号
				// 6、IV\_BATCHNO 批号
				// 7、IV\_PRODUCTDATE 生产日期
				// 8、IV\_EFFDATE 有效期
				// 9、IV\_PRODUCTDATE\_PRINT 打印生产日期
				// 10、IV\_EFFDATE\_PRINT 打印有效日期
				// 11、IN\_AMOUNT 数量
				// 12、IV\_TPBAR 托盘号
				// 13、IV\_LOCATION 指定货位
				// 14、IV\_GOODSTATUS 质量状态
				// 15、IV\_KUB 库别
				// 16、IV\_KUF\_NO 库房
				// 17、IV\_QUY\_NO 区域
				// 18、IV\_UNIQUECODE 唯一码
				// 19、IV\_BGZID 保管账：默认1
				// 20、IV\_NLS 内联数
				// 21、IV\_YWZT 业务状态
				const STORAGE_ID = uni.getStorageSync('STORAGE_ID')
				const GZTID = this.GZTID ? this.GZTID : "%"
				const USER_ID = uni.getStorageSync('USER_ID')
				const inbillNo = this.inbillNo ? this.inbillNo : "%"
				console.log("单号:" + inbillNo)
				const ITM = this.oneMx.ITM ? this.oneMx.ITM : "%"
				const BATCHNO = this.oneMx.BATCHNO ? this.oneMx.BATCHNO : "%"

				const PRODUCTDATE = this.oneMx.PRODUCTDATE ? this.oneMx.PRODUCTDATE : "%"
				const EFFDATE = this.oneMx.EFFDATE ? this.oneMx.EFFDATE : "%"
				const PRODUCTDATE_PRINT = PRODUCTDATE
				const EFFDATE_PRINT = EFFDATE

				//200
				const sjAmouont = this.sjAmouont ? this.sjAmouont : ""
				if (!sjAmouont) {
					this.$u.toast('请填写上架数量')
					return;
				}
				//本次入库数量上限
				const MaxAmount = Number(this.oneMx.AMOUNT - this.oneMx.SHIS_AMOUNT)
				if (Number(MaxAmount - this.sjAmouont) < 0) {
					this.$u.toast('超出本明细数量上限! 数量上限:' + MaxAmount)
					return;
				}
				console.log("数量上限:" + MaxAmount)
				//0
				const TPBAR = this.form.tpbar
				if (!TPBAR) {
					this.$u.toast('请填写托盘号')
					return;
				}
				//空
				const sjLocation = this.sjLocation ? this.sjLocation : ""
				//1
				const GOODSTATUS = 1
				//%
				const KUB = this.oneMx.KUB ? this.oneMx.KUB : "%"
				// YCQ
				const KUF_NO = this.kuf ? this.kuf : "%"
				//%
				const QUY_NO = this.oneMx.QUY_NO ? this.oneMx.QUY_NO : "%"
				//0
				const UNIQUECODE = this.oneMx.UNIQUECODE ? this.oneMx.UNIQUECODE : "0"
				//1
				const BGZID = this.oneMx.BGZID ? this.oneMx.BGZID : "1"
				//1
				const NLS = this.form.iv_nls ? this.form.iv_nls : "1"
				//01
				const YWZT = this.oneMx.YWZT ? this.oneMx.YWZT : "01"
				//DHJ01
				const landpoint = this.form.landpoint

				if (!landpoint || landpoint === "%") {
					this.$u.toast('请选择入库点')
					return;
				}

				let param = STORAGE_ID + "," +
					GZTID + "," +
					USER_ID + "," +
					inbillNo + "," +
					ITM + "," +
					BATCHNO + ","

					+
					PRODUCTDATE + "," +
					EFFDATE + "," +
					PRODUCTDATE_PRINT + "," +
					EFFDATE_PRINT + ","

					+
					sjAmouont + "," +
					TPBAR + "," +
					sjLocation + "," +
					GOODSTATUS + ","

					+
					KUB + "," +
					KUF_NO + "," +
					QUY_NO + ","

					+
					UNIQUECODE + "," +
					BGZID + "," +
					NLS + "," +
					YWZT + "," +
					landpoint;

				console.log("iv_parm:" + param + ";")
				let that = this
				this.$u.api.prcutlexecvar({
						iv_code: "PDAINBILLSH",
						iv_parm: param,
						ov_var1: '2',
						ov_var2: '2',
						ov_var3: '2',
						ov_var4: '2',
						ov_var5: '2',
					})
					.then(res => {
						console.log("返回的res:" + JSON.stringify(res))
						// that.$u.toast(res.msg);
						// that.$refs.uToast.show({
						// 					title: res,
						// 					type: 'info',

						// 				})

						if (res.success) {
							that.$u.toast(res.msg);
							let data = res.data
							// console.log("返回的data:" + JSON.stringify(data))
							console.log("返回的res.msg:" + res.msg)
							//补充text
							// this.actionSheetList = data.map(v => {
							// 	this.$set(v, 'text', v
							// 		.STORAGE_NAME) // https://vuejs.org/v2/guide/reactivity.html
							// 	return v
							// })
							// this.list = data
							// this.mxList = data
							// // 刷新明细数据展示
							// this.myMxShow()

							// // 默认选择一个明细
							// this.goTo(0)
							//成功后 上架数量归为1
							this.submitSuccess()
							if (paramReturn == "returnSearch") {
								//回到明细列表
								this.current = 0
							}
							//直接点击第一个
							// this.goTo(0,0)
							// this.getNextMx()
						} else {

							this.dialogData = {
								title: '入库失败',
								msgType: 'error',
								errContent: res.msg,
								confirmText: '重新提交入库',
								functionName: 'submitIn',
								cancelText: '关闭',
							}
							this.errDialogShow()
						}

					});
			},
			dialogToggle() {
				console.log("open!!!")
				this.$refs.errDialog.open()
			},
			testErrdialog() {

				// this.dialogToggle()
				this.dialogData = {
					title: '入库失败',
					msgType: 'error',
					errContent: "我是一个错误的提示信息模拟",
					confirmText: '重新提交入库',
					functionName: 'submitIn',
				}

				this.errDialogShow()
			},
			submitSuccess() {
				this.inbillForm.boxNumber = ''
				zhendong();
				tishiyin();
				this.changeFocusToBoxNumber()
				this.oneMx.vue_number = ''
			},
			// 获取并执行下一条明细数据
			getNextMx() {
				const now = this.oneMx.index
				const total = this.oneMx.total
				// 是否所有循环都结束
				const allOver = false
				let oneOver = false
				//循环所有
				for (let i = 0; i < total; i++) {
					oneOver = this.mxList[i].over
					// 如果未执行,那么就可以准备出库,执行, 并结束循环
					if (!oneOver) {
						this.goTo(1, i)
						return;
					}
				}

			},
			navTo(url) {
				uni.navigateTo({
					url: url
				});
			},
			getInListOneInfo() {
				//1、IV\_STORAGEID 仓库id,
				// 2、IV\_YEZ\_ID 业主id
				// 3、IV\_USER\_ID 用户id
				// 4、IV\_INPAGENO 入库单号
				// 5、IV\_ITM 行号
				// 6、IV\_DWID 单位编号
				// 7、IV\_GOODS 商品信息（编号，六九码，%）
				// 8、IV\_TPBAR 托盘号
				const STORAGE_ID = uni.getStorageSync('STORAGE_ID')
				if (!STORAGE_ID) {
					this.$u.toast('请返回到工作台上方选择分仓，然后再次尝试搜索')
					return
				}
				// const USER_GH = uni.getStorageSync('USER_GH')
				const yez_id = this.form.huoz_id ? this.form.huoz_id : "%"
				const USER_ID = uni.getStorageSync('USER_ID')
				const inpageno = this.inbillNo ? this.inbillNo : "%"
				const itm = this.form.itm ? this.form.itm : "%"
				const rwid = this.form.rwid ? this.form.rwid : "%"
				const goodsId = this.goods ? this.goods : "%"
				const tpbar = this.form.tpbar ? this.form.tpbar : "%"
				let param = STORAGE_ID + "," + yez_id + "," + USER_ID + "," +
					inpageno + "," + itm + "," + rwid + "," + goodsId +
					"," + tpbar;
				console.log("iv_parm:" + param)
				let that = this
				this.$u.api.general({
						iv_code: "PDAINBILLDISP",
						iv_parm: param
					})
					.then(res => {
						// console.log("返回的res:" + JSON.stringify(res))
						let data = res.data
						// console.log("返回的data:" + JSON.stringify(data))
						if (res.success) {
							//补充text
							this.mxList = data.map(v => {
								this.$set(v, 'over', false) // https://vuejs.org/v2/guide/reactivity.html
								this.$set(v, 'index', 0)
								this.$set(v, 'total', data.length)
								return v
							})
							// this.list = data
							// this.mxList = data
							// 刷新明细数据展示
							this.myMxShow()

							// 默认选择一个明细
							// this.goTo(0,0)
							// 末尾显示
							this.status = 'nomore';

							// 把明细重新加载一下
							// 清空当前明细
							this.oneMx = []
							// this.oneMx = file
							const filterEd = {}
							const tabs = this.mxList
							const myCgdNo = this.myCgdNo
							console.log('过滤条件：' + JSON.stringify(this.myCgdNo))

							// this.oneMx = tabs.filter(tab => {
							// 	console.log('每条过滤条件'+tab.INPAGENO + '#' + tab.ITM)
							// 	console.log('每条过滤条件this.myCgdNo:'+this.myCgdNo)
							// });
							this.oneMx = tabs.filter(tab =>
								tab.INPAGENO + '#' + tab.ITM == myCgdNo
							);
							console.log('过滤后的查询：' + JSON.stringify(this.oneMx))
							if (this.oneMx.length > 0) {
								this.oneMx = this.oneMx[0]
							} else {
								// this.$u.toast("暂无数据");
							}


						} else {
							this.$u.toast(res.msg);
						}
					});
			},
			hello(hello) {
				// this.$u.toast(hello)
			},
			// 判定点击的哪个输入框
			changeScanInput(inputItem) {
				this.refreshScan()
				console.log(inputItem)
				this.scanInput = inputItem
			},
			// 扫描后执行的方法,判断输入框并绑定值,可以自行跳转,或者扫描完执行某方法,
			changeScanValue() {
				let scanInput = this.scanInput
				let result = JSON.parse(this.scanResult)
				if ("form.tpbar" === scanInput) {
					console.log("this.form.tpbar ")
					this.form.tpbar = result
				} else if ("sjAmouont" === scanInput) {
					console.log("this.sjAmouont")
					this.sjAmouont = result
				} else if ("inbillNo" === scanInput) {
					console.log("this.inbillNo")
					this.inbillNo = result
					this.searchMx()
					//form.scanAll
				} else if ("form.iv_nls" === scanInput) {
					console.log("this.form.iv_nls")
					this.form.iv_nls = result

					//form.iv_nls
				} else if ("form.scanAll" === scanInput) {
					console.log("this.form.scanAll")
					this.form.scanAll = result

				} else if ("form.boxNumber" === scanInput) {
					console.log("this.form.boxNumber")
					this.form.boxNumber = result
				} else if ("inbillForm.boxNumber" === scanInput) {
					console.log("this.inbillForm.boxNumber")
					this.inbillForm.boxNumber = result
				} else if ("inbillForm.location" === scanInput) {
					console.log("this.inbillForm.location")
					this.inbillForm.location = result
				} else {
					//inbillForm.location
					//inbillForm.boxNumber
					//form.boxNumber
					// this.$u.toast('没有预先适配:' + scanInput)
					console.log('没有预先适配:' + scanInput)
				}

			},
			blurFunction() {
				console.log("失去了焦点")
				this.myMxShow()
			},
			changeProductDate(e) {
				console.log("选择的日期:" + JSON.stringify(e))
				this.oneMx.PRODUCTDATE = e.result
				this.myMxShow()
			},
			changeEFFDATE(e) {
				this.oneMx.EFFDATE = e.result
				this.myMxShow()
			},
			changeGzt(index) {
				// debugger
				const newGzt = this.gztList.filter((item) => {
					return item.GZTID === index
				})[0]
				this.gztNowLabel = newGzt.text
				uni.setStorageSync('gztNowLabel', this.gztNowLabel)
				// id
				const GZTID = newGzt.GZTID
				if (GZTID) {
					this.GZTID = GZTID
					uni.setStorageSync('IN_GZTID', GZTID)
				} else {
					this.GZTID = ''
					uni.removeStorageSync('IN_GZTID')
				}
				console.log("川南入库工作站IN_GZTID:" + uni.getStorageSync('IN_GZTID'))
				this.showHeight = false
			},
			changeKuf(index) {
				// 表层文字
				// this.gztNowLabel = this.gztList[index].text;
				// uni.setStorageSync('gztNowLabel', this.gztNowLabel)

				// id
				const KUF_NO = this.kufList[index].KUF_NO == "%" ? '' : this.kufList[index].KUF_NO;
				console.log('选中的库房号:' + KUF_NO)
				if (KUF_NO) {
					this.kuf = KUF_NO
					uni.setStorageSync('kuf', KUF_NO)

				} else {
					this.kuf = ''
					uni.removeStorageSync('kuf')
				}
				console.log("缓存中的库房kuf:" + uni.getStorageSync('kuf'))

			},
			getLandpointList(loginType) {
				// const user_id = uni.getStorageSync('USER_ID')
				const STORAGE_ID = uni.getStorageSync('STORAGE_ID')
				const type = "1"

				let param = STORAGE_ID + "," + type
				console.log(param)
				this.$u.api.general({
						iv_code: "GETSXCSKLD",
						iv_parm: param
					})
					.then(res => {
						// console.log("返回的res:" + JSON.stringify(res))
						let data = res.data
						console.log("点位集合返回的data:" + JSON.stringify(data))
						if (res.success) {
							//补充text
							this.landpointList = data.map(v => {
								this.$set(v, 'text', v
									.DOCK_LANDMARKID
								)
								this.$set(
									v, 'value', v.DOCK_LANDMARKID
								)
								return v
							})
						} else {
							this.$u.toast(res.msg);
						}
					});
			},
			getGzt(loginType) {
				const user_id = uni.getStorageSync('USER_ID')
				const STORAGE_ID = uni.getStorageSync('STORAGE_ID')
				const kuf = "%"
				const gztType = "1"
				const gztId = "%"
				let param = user_id + "," + STORAGE_ID + "," + kuf + "," + gztType + "," + gztId;
				console.log(param)
				this.$u.api.general({
						iv_code: "GETGZTINFO",
						iv_parm: param
					})
					.then(res => {
						// console.log("返回的res:" + JSON.stringify(res))
						let data = res.data
						console.log("返回的data:" + JSON.stringify(data))
						if (res.success) {
							//补充text

							this.gztList = data.map(v => {
								this.$set(v, 'text', v
									.GZTNAME + "(" + v.GZTID + ")"
								)
								this.$set(v, 'value', v.GZTID)
								return v
							})
						} else {
							this.$u.toast(res.msg);
						}
					});
			},
			getKuf(loginType) {
				const USER_ID = uni.getStorageSync('USER_ID')
				const KUB = '%'
				const KUF_NO = "%"
				const GET_TYPE = "2"
				let param = USER_ID + "," + KUB + "," + KUF_NO + "," + GET_TYPE;
				console.log(param)
				this.$u.api.general({
						iv_code: "GETKUFQUYNO",
						iv_parm: param
					})
					.then(res => {
						// console.log("返回的res:" + JSON.stringify(res))
						let data = res.data
						console.log("kuf返回的data:" + JSON.stringify(data))
						if (res.success) {
							//补充text
							this.kufList = data.map(v => {
								this.$set(v, 'text', v
									.KUF_NO
									// +"("+v.GZTID+")"
								) // https://vuejs.org/v2/guide/reactivity.html
								return v
							})
						} else {
							this.$u.toast(res.msg);
						}
					});
			},
		}

	}
</script>
<style lang="scss" scoped>
	@import '../../common/index.scss';
	@import '../../common/base-change.scss';

	.my-button-group {
		// background-color: pink;
		// text-align: center;
		margin-top: 35rpx;
		// margin-left: -50rpx;
	}
</style>